package com.sf.hackathons.app.utils;

import android.content.Context;

import com.sf.hackathons.lib.http.ComRequestManager;
import com.sf.hackathons.lib.http.ITokenErrorCallback;


/**
 * Created by guofanghua on 17/5/1.
 * 处理application相关的数据逻辑
 */
public class ApplicationUtils {

    //===========================离线模块=========================


    //=================http 请求和相关业务逻辑=====================
    public static void initHttp(Context context) {
        //初始化http
        ComRequestManager.init(context.getApplicationContext(), new ITokenErrorCallback() {
            @Override
            public boolean dealTokenError(String errCode, String msg) {
                //  这里处理token过期 by weatherfish 01174599
                return ApplicationUtils.dealWithToken(errCode, msg);
            }
        });
    }

    /**
     * @author guofanghua
     * 处理token失效的处理
     */
    public static boolean dealWithToken(String code, String msg) {

        return false;
    }
    //====================Tcp 初始化以及相关流程逻辑==================


}
